package com.caption.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.caption.auth.model.entity.SysPermission;
import com.caption.auth.model.entity.SysRole;
import com.caption.auth.model.entity.SysUser;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description: TODO
 * @author: 码农
 * @date: 2021-12-26 13:42:03
 */

public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 查询用户角色
     * @param userId
     * @return
     */
    List<SysRole> selectRoleByUserId(Long userId);

    /**
     * 查询用户权限
     * @param userId
     * @return
     */
    List<SysPermission> selectPermissionByUserId(Long userId);

}
